package com.coupons.business.common.vo.decorator;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import com.coupons.business.common.vo.Category;

public class CategoryRowMapper implements RowMapper {

	public Object mapRow(ResultSet objaResultSet, int index) throws SQLException 
	{
		Category objlCategory = new Category();
		
		objlCategory.setCategoryId(objaResultSet.getInt("ctgry_id"));
		objlCategory.setCategoryName(objaResultSet.getString("ctgry_name"));
		objlCategory.setMerchantId(objaResultSet.getInt("mrchnt_id"));
		objlCategory.setPartnerId(objaResultSet.getInt("partner_id"));
		objlCategory.setDescription(objaResultSet.getString("description"));
		objlCategory.setStatus(objaResultSet.getString("Status"));
		objlCategory.setCreationDate(objaResultSet.getDate("crtn_dt"));
		objlCategory.setLastUpdatedDate(objaResultSet.getDate("last_updt_dt"));
		objlCategory.setLastUpdatedUser(objaResultSet.getString("last_updt_user"));
		objlCategory.setRank(objaResultSet.getInt("rank"));
		
		return objlCategory;
	}

}
